{{- if .Values.rbacManager.deploy }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: {{ template "crossplane.name" . }}-rbac-manager
  labels:
    app: {{ template "crossplane.name" . }}
    {{- include "crossplane.labels" . | indent 4 }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ template "crossplane.name" . }}-rbac-manager
subjects:
- kind: ServiceAccount
  name: rbac-manager
  namespace: {{ .Release.Namespace }}
{{- end}}